<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><s:property value="#session.access"/></title>
<meta name="viewport" content="width=device-width,inital-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/css/bootstrap.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/css/bootstrap-responsive.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/bootstrap.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validate/validate.js"></script>
<script type="text/javascript">

$(function() {
	$("#sform").validate({
		rules : {
			lnkNo : {	required : true	},
			lnkName : {	required : true	},
			txnOrder : {	required : true	},
			txnCur : {	required : true	},
			txnLoc : {	required : true	,number : true},
			txnProduct : {	required : true	},
			txnFname : {	required : true	},
			txnLname : {	required : true	},
			txnPhone : {	required : true	},
			txnEmail : {	required : true	},
			txnCountry : {	required : true	},
			txnState : {	required : true	},
			txnCity : {	required : true	},
			txnAddr : {	required : true	},
			txnZip : {	required : true	}
		},
		errorPlacement : function(error, element) {
			element.css("border-color","#1c3e57");
		},
	});
});
</script>
</head>
<body>
	<div class="container">
		
		<s:action name="global_menu"  executeResult="true"></s:action>
		
		<div class="row">
			<div class="span12">
					<ul class="breadcrumb">
						<li>
							<a href="javascript:void(0)">首页</a> <span class="divider">/</span>
						</li>
						<li>
							<a href="javascript:void(0)">商户工具</a> <span class="divider">/</span>
						</li>
						<li class="active">
							支付链接
						</li>
					</ul>
					
					<h4>
						创建支付链接  <a style="font-size: 14px;" href="<%=request.getContextPath()%>/link_list.html" >链接历史</a>
					</h4>
					
					 <form id="sform" class="form-horizontal" action="<%=request.getContextPath() %>/link_save.html" method="post" enctype="multipart/form-data">
						<fieldset>
							
							<div class="control-group">
								<label class="control-label" >选择一个网站 : </label>
								<div class="controls">
									<s:select id="lnkSelect" list="websiteList" listValue="webAddress"  listKey="webNo" headerKey="" headerValue="未选择" onchange="$('#lnkNo').val($('#lnkSelect').val());$('#lnkName').val($('#lnkSelect').find('option:selected').text());"></s:select>
									<input type="hidden" id="lnkNo" name="lnkNo">
									<input type="hidden" id="lnkName" name="lnkName">
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >订单号 : </label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="txnOrder" name="txnOrder"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >币种 : </label>
								<div class="controls">
									<input type="text" style="width: 120px;" class="input-xlarge" id="txnCur" name="txnCur"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >金额 : </label>
								<div class="controls">
									<input type="text" style="width: 120px;" class="input-xlarge" id="txnLoc" name="txnLoc"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >产品名称 : </label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="txnProduct" name="txnProduct"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" ></label>
								<div class="controls">
									<hr/>
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >客人名字 : </label>
								<div class="controls">
									<input placeholder="First Name" type="text" style="width: 120px;" class="input-xlarge" id="txnFname" name="txnFname"  /> - <input type="text" placeholder="Last Name" style="width: 120px;" class="input-xlarge" id="txnLname" name="txnLname"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >联系电话 : </label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="txnPhone" name="txnPhone"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >联系邮箱 : </label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="txnEmail" name="txnEmail"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >国家 : </label>
								<div class="controls">
									<s:select list="@dicts.CountryDict@COUNTRY_MAP" id="txnCountry" name="txnCountry" listValue="value" listKey="key"></s:select>
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >州/省 : </label>
								<div class="controls">
									<input type="text" style="width: 120px;" class="input-xlarge" id="txnState" name="txnState"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >城市 : </label>
								<div class="controls">
									<input type="text" style="width: 120px;" class="input-xlarge" id="txnCity" name="txnCity"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >地址 : </label>
								<div class="controls">
									<input type="text" class="input-xlarge" id="txnAddr" name="txnAddr"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >邮编 : </label>
								<div class="controls">
									<input type="text" style="width: 120px;" class="input-xlarge" id="txnZip" name="txnZip"  />
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" >备注信息</label>
								<div class="controls">
									<textarea class="input-xlarge" id="lnkRemark" name="lnkRemark" rows="4" ></textarea>
								</div>
							</div>
							
							<div class="form-actions">
								<input type="button" class="btn btn-primary" onclick="if($('#sform').valid()){$('#sform').submit();}"  value="保存"/>
								<input type="button" class="btn" onclick="location.href='<%=request.getContextPath()%>/subject_list.html'" value="取消"/>
							</div>
							
						</fieldset>
					</form>
					
					<div class="hero-unit" style="padding: 15px;font-size: 14px;line-height: 20px;">
						<p>
							1 . 订单号不能超过32位,不能含有特殊符号如$等,可以使用下划线,例如2012101005522200944 .
						</p>
						<p>
							2 . 只有产生过至少一次交易的网站才能创建支付链接 .
						</p>
					</div>
					
					
		</div>
	</div>
	
	
		<s:action name="global_foot"  executeResult="true"></s:action>
</div>
</body>
</html>

